import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import { render } from '@testing-library/react';
import Checkbox from './Checkbox';

test('should render the Checkbox component with the label', () => {
    const { container } = render(<Checkbox checked />);
    const checkboxInput = container.querySelector('input[type="checkbox"]');
    expect(checkboxInput).toBeInTheDocument();
});

test('should renders as checked', () => {
    const { getByLabelText } = render(<Checkbox label="Checked Checkbox" checked />);
    expect(getByLabelText('Checked Checkbox')).toBeChecked();
});